{include file="public/_meta" /}
<link href="__PUBLIC_ADMIN__css/plugins/iCheck/custom.css"
	rel="stylesheet">
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="ibox-title">
			<h5>添加推广游戏</h5>
			<div class="ibox-tools">
				<a href="{:url('admin/idiom/extension_list')}"
					class="btn btn-primary btn-xs">返回列表</a>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form action="{:url('admin/idiom/extension_add_post')}" method="post" class="form-horizontal"enctype="multipart/form-data">
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">推广类型：</label>
								<div class="col-sm-4">
									<select class="form-control" name="type">
										<option value="1" class="dis">首页</option>
										<option value="0" class="str">更多游戏</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">游戏LOGO：</label>
								<div class="col-sm-10">
									<div class="up">
										<input placeholder="" name="file" class="one" type="file">
										<div id="preview1">
											<img src="" alt="">
										</div>
									</div>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">游戏名称：</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" value="" name="title">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">游戏简介：</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" value="" name="content">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">跳转链接：</label>
								<div class="col-sm-10">
									<input type="text" class="form-control" value="" name="url">
								</div>
							</div>

							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-2">
									<button class="btn btn-primary" type="submit">保存内容</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>

	{include file="public/_footer" /}

	<!-- 自定义js -->
	<script src="__PUBLIC_ADMIN__js/content.js?v=1.0.0"></script>
	<script type="text/javascript" charset="utf-8"
		src="__PUBLIC_ADMIN__utf8-php/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8"
		src="__PUBLIC_ADMIN__utf8-php/ueditor.all.min.js"></script>
	<!-- iCheck -->
	<script src="__PUBLIC_ADMIN__js/plugins/iCheck/icheck.min.js"></script>

	<script>
        $(document).ready(function() {
        	$('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
			
            $('.refresh').click(function(){
            	//window.location.reload();	// 刷新页面
            })
		});
	</script>
	<script
		src="__PUBLIC_ADMIN__meeting/js/plugins/layer/laydate/laydate.js"></script>
	<script>
        //外部js调用
        laydate({
            elem: '#hello', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
        });

        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD hh:mm:ss',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD hh:mm:ss',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);
    </script>
	<script>
        $('.addInput').click(function(){
            var str = '';
            var str = '<input style="margin-top:5px;" type="text" class="form-control inputType" value="" name="grade[]">';
            $(".inputType").eq(-1).after(str);
        })
    
    </script>
</body>
</html>
